<template>
	<view class="pages-home" :style="{background:pageColor}">
		<abnor type="REQUEST_ERROR" @confirm="initRefresh" btnSize="" :isCenter="true" v-show="isLoad && !is_network">
		</abnor>
    <view class="bg-top-color"></view>
		<block v-if="isLoad && is_network">
			<!-- #ifndef H5 -->
			<uni-nav-bar :fixed="true" :shadow="false" :statusBar="true" :title="configInfo.app_text" color="#ffffff"
				:backgroundColor="primaryColor">
			</uni-nav-bar>
			<view :style="{height:`${configInfo.navBarHeight}px`}"></view>
			<!-- #endif -->

			<view v-if="configInfo.plugAuth.hotel">
				<view class="space-sm" :style="{background:pageColor}"></view>
				<view class="flex-between fill-base" style="padding:30rpx 20rpx 30rpx 30rpx">
					<view @tap.stop="$util.goUrl({url:`/user/pages/choose/city?type=2`})" class="flex-y-center">
						<view class="ellipsis" style="max-width: 100rpx;">{{city_info | handleCityText}}</view>
						<i class="iconfont icon-down" style="transform: scale(0.5);"></i>
					</view>
					<view @tap.stop="$util.goUrl({url:`/hotel/pages/list`})" class="flex-1 flex-between ml-md">
						<view style="width: calc(100% - 150rpx)">
							<search type="input" :padding="0" :radius="30" height="70rpx" :confirmSearch="true"
								backgroundColor="#F0F0F0" placeholder="请输入酒店名称">
							</search>
						</view>
						<view class="flex-center f-desc c-base text-bold"
							style="width:130rpx;height: 52rpx;border-radius: 8rpx;" :style="{background:primaryColor}">
							附近酒店
						</view>
					</view>
				</view>
			</view>

			<block v-for="(pageitem,pageindex) in configInfo.page[1]" :key="pageindex">
				<!-- 轮播图 -->
				<block v-if="['banner','service-banner'].includes(pageitem.type)">
					<view
						:class="['service-banner',{'mt-md':banner.list.length ==0 || (pageindex>0&&configInfo.page[1][pageindex-1].type==='coach-recommend')},{'rel':banner.list.length >0}]"
						v-if="(banner.list&&banner.list.length > 0 || banner.service_filter)" style="padding-top: 16rpx">
<!--            :style="{height:banner.list.length > 0? banner.banner_height + (banner.service_filter ? 64 : 0) + 'rpx' :`84rpx`}"-->
						<banner class="service-banner" @change="goBanner" :list="banner.list" :height="banner.banner_height" :margin="0"
							:autoplay="true" :indicatorActiveColor="primaryColor" :dotWidth="20" :dotBottom="30"
							v-if="banner.list.length > 0">
						</banner>
						<!-- <view class="service-banner-info">
                			<img class="service-banner-info-img" src="../static/img/serviceImg/service-banner.png" />
							
						</view> -->

            <!--  服务介绍      -->
            <view class="intro f-caption">
              <view class="flex-y-center">
                <img src="../static/img/serviceImg/overtime.png" />
                <view style="color:#666666;margin-left: 12rpx">超时秒退</view>
              </view>
              <view class="flex-center">
                <img src="../static/img/serviceImg/qualify.png" />
                <view style="color:#666666;margin-left: 12rpx">持证上岗</view>
              </view>
              <view class="flex-center">
                <img src="../static/img/serviceImg/compensate.png" />
                <view style="color:#666666;margin-left: 12rpx">违约赔付</view>
              </view>
              <view class="flex-center">
                <img src="../static/img/serviceImg/safeguard.png" />
                <view style="color:#666666;margin-left: 12rpx">全场保障</view>
              </view>
            </view>

<!--        :class="[{'abs':banner.list.length>0}]"    -->
						<view class="banner-search-box flex-center fill-base ml-md mr-md radius box-shadow mb-md" v-if="banner.service_filter">
							<view style="width: 92%;">
								<tab @change="handerTabChange" :isLine="false" :list="tabList"
									:activeIndex="activeIndex*1" :activeColor="primaryColor" activeTextFontSize="28rpx"
									:width="100/tabList.length + '%'" height="84rpx"></tab>
							</view>
							<view style="width: 8%;"></view>
						</view>
<!--						<view class="banner-filter abs"
							:style="{background:pageColor,top:banner.banner_height - 32 + 'rpx'}"
							v-if="!banner.service_filter">
						</view>-->
					</view>
				</block>

				<!-- 分类 -->
				<block v-if="['column','service-column'].includes(pageitem.type)">
					<view
						v-if="service_cate.list&&service_cate.list.length>0" style="background-color: #f7f5f5;margin-top: 0rpx;">
						<column @change="goCate" :list="service_cate.list" :indicatorActiveColor="primaryColor"
							:colNum="service_cate.col_num" :rowNum="service_cate.row_num" :whiteSpace="pageindex?0:30">
						</column>
					</view>

				</block>
				<!--广告图-->
				<block v-if="pageitem.type === 'imagewindow'">
					<imageWindow class="service-imageWindow" :list="pageitem.data.imagewindowList" :colType="pageitem.data.imagewindowName"
						:wingBlank="pageitem.data.style.wingBlank" :whiteSpace="pageitem.data.style.whiteSpace"
						:layout="2" :isDiyPage="true" @change="goBanner($event, pageIndex, 'imagewindow')">
					</imageWindow>
					<!--<view class="service-imageWindow">
                	<img class="service-imageWindow-img" src="../static/img/serviceImg/imageWindow.png" />
					</view>-->
					
				</block>
				<!-- 推荐技-师 -->
				<view
					:class="[{'pt-md':pageindex===0},{'pt-sm':pageindex>0&&configInfo.page[1][pageindex-1].type.includes('banner')&&!banner.service_filter},{'mt-md':recommend_style!==3&&pageindex>0&&((configInfo.page[1][pageindex-1].type.includes('banner')&&banner.service_filter)||!configInfo.page[1][pageindex-1].type.includes('banner'))},{'pt-lg':recommend_style===3&&pageindex>0&& ((configInfo.page[1][pageindex-1].type.includes('banner')&&banner.service_filter)||(!configInfo.page[1][pageindex-1].type.includes('banner')))}]"
					v-if="pageitem.type==='coach-recommend' && configInfo.plugAuth.recommend" style="margin-top: 0;">
					<longbingbing-coach-recommend-item :o="pageitem"></longbingbing-coach-recommend-item>
				</view>
				<!-- 服务列表 -->
				<view
					v-if="pageitem.type==='service-list'" style="background-color: #f7f5f5;">
					<view class=""
						v-if="pageitem.data.isShowTitle" style="padding:16rpx;display: flex;justify-content: space-between;">
            <!-- <img src="../static/img/serviceImg/combo.png" class="mr-md"> -->
            <view style="font-size: 30rpx;color: #333333;font-weight: 500;">
						  {{pageitem.data.title}}
            </view>
            <view class="flex-y-center f-caption c-caption">
						更多项目<i class="iconfont icon-right" style="font-size: 24rpx;"></i>
            </view>
					</view>
					<scroll-view scroll-x :scroll-into-view="'tab'+param.cate_id" :scroll-with-animation="true"
						class='service-cate-list'
						:style="{marginTop:!pageitem.data.isShowTitle&&pageindex>0&&configInfo.page[1][pageindex-1].type.includes('banner')&&!banner.service_filter?'0rpx':''}"
						v-if="pageitem.data.isShowCate">
						<view @tap.stop="handerCateChange(item.id, 'cate_id')" class="cate-item f-caption radius rel"
							:id="'tab'+item.id"
							:style="{ background: param.cate_id === item.id ? primaryColor : '', color:  param.cate_id === item.id ? '#fff' : '' }"
							v-for="(item,index) in cate_list" :key="index">
							<view class="abs radius" :style="{ background: primaryColor }"></view>
							<view class="flex-center">{{ item.title }}</view>
						</view>
					</scroll-view>
					<view class=" bg-white" :class="[{'flex-warp':pageitem.data.type===3}]" style="padding: 0 16rpx;background-color: #f7f5f5;overflow: hidden;border-radius: 38rpx 38rpx 38rpx 38rpx;">
						<view
							:class="[{'fill-base pd-md':pageitem.data.type!==3&&pageitem.data.type!==4},{'mr-md':pageitem.data.type===3&&index%2==0},]"
							v-for="(item,index) in list.data" :key="index"
              style="overflow: hidden"
            >
							<longbingbing-service-list-item :info="item"
								:o="pageitem.data"></longbingbing-service-list-item>
						</view>
					</view>
				</view>
				<!-- 行业分类 -->
				<view class="industry-cate-list"
					v-if="pageitem.type == 'industry-cate-list' && industry_cate_list && industry_cate_list.length>0">
					<view class="tab-list flex-warp pb-lg"
						:class="[ { 'pt-lg': !pageindex  || (pageindex > 0 && ((configInfo.page[1][pageindex-1].type.includes('banner') && configInfo.page[1][pageindex-1].data.isShowFilter) || !configInfo.page[1][pageindex-1].type.includes('banner'))) } ]">
						<view @tap.stop="handerCateChange(item.id,'industry_type')"
							class="list-item flex-center flex-column" v-for="(item, index) in industry_cate_list"
							:key="index">
							<view class="f-mini-title c-title text-bold"
								:style="{ color: param.industry_type === item.id ? primaryColor : '' }">
								{{ item.title }}
							</view>
							<view class="item-desc fill-base flex-center f-icontext radius" style="margin-top: 8rpx"
								:style="{ background: !item.desc ? pageColor : param.industry_type === item.id && item.desc ? primaryColor : '', color: param.industry_type === item.id ? '#fff' : '' }">
								{{ item.desc }}
							</view>
						</view>
					</view>
					<block v-if="list.data && list.hasOwnProperty('total')">
						<!-- v-if="industry_cate_list.findIndex(aitem=>{return aitem.id == param.industry_type}) != -1" -->
						<view class="ml-md mr-md flex-warp">
							<view :class="[{'mt-md':index>1},{'mr-md':index%2==0}]" v-for="(item,index) in list.data"
								:key="index">
								<longbingbing-industry-coach-item :info="item"></longbingbing-industry-coach-item>
							</view>
						</view>
					</block>
					<block v-else>
						<view class="ml-md mr-md fill-base radius-16" style="padding: 28rpx 28rpx 20rpx 28rpx"
							:class="[{'mt-md':index>0}]" v-for="(item, index) in list.data" :key="index">
							<view
								@tap.stop="$util.goUrl({url:`/user/pages/service/list?id=${item.id}&title=${item.cate_name}&industry=1`})"
								class="flex-between" style="height:44rpx">
								<view class="f-mini-title c-title text-bold">{{item.cate_name || ''}}</view>
								<view class="f-caption c-caption flex-y-center">
									查看更多<i class="iconfont icon-right" style="font-size: 20rpx"></i>
								</view>
							</view>
							<view class="industry-list flex-warp">
								<view @tap.top="$util.goUrl({url:`/user/pages/detail?id=${aitem.id}`})"
									class="list-item" :style="{ marginTop: aindex < 3 ? '18rpx' : '24rpx' }"
									v-for="(aitem, aindex) in item.list" :key="aindex">
									<image mode="aspectFill" class="cover" :src="aitem.cover"></image>
									<view class="flex-center f-desc c-title text-bold" style="padding:15rpx 0 10rpx 0">
										<view class="ellipsis">{{ aitem.title }}</view>
									</view>
									<view class="flex-center f-caption c-warning">
										<span class="text-bold">{{ aitem.price }}</span>元<span
											v-if="aitem.show_unit">/{{ aitem.show_unit }}</span>
									</view>
								</view>
							</view>
						</view>
					</block>
				</view>
				<!-- 技师列表 -->
				<view class="ml-md mr-md mt-md"
					:class="[{'flex-warp': configInfo.coach_list_format == 2 || (configInfo.play_list_format == 1 && careerList[careerIndex].type == 2 && configInfo.coach_career_show == 1) || configInfo.plugAuth.industrytype == 2}]"
					v-if="list.data && list.data.length>0 && pageitem.type == 'coach-list'">
					<view
						:class="[
								{'mt-md':(configInfo.plugAuth.industrytype != 2 && [1,3,4].includes(configInfo.coach_list_format) && (careerList[careerIndex].type != 2 || !configInfo.coach_career_show) &&index!=0) || ((configInfo.coach_list_format == 2 || (configInfo.play_list_format == 1 && careerList[careerIndex].type == 2 && configInfo.coach_career_show == 1) || configInfo.plugAuth.industrytype === 2 ) && index>1)},
								{'mr-md': (configInfo.coach_list_format == 2 || (configInfo.play_list_format == 1 && careerList[careerIndex].type == 2 && configInfo.coach_career_show == 1) || configInfo.plugAuth.industrytype === 2) && index%2==0}]"
						v-for="(item,index) in list.data" :key="index">
						<longbingbing-technician-list-item @comment="toShowPopup(index,'message')"
							:type="configInfo.coach_format == 2 && configInfo.coach_career_show == 1 ? careerList[careerIndex].type : 0"
							@collect="toCollect(index)" @order="toShowPopup(index,'technician')" :info="item">
						</longbingbing-technician-list-item>
					</view>
				</view>
			</block>


			<load-more :noMore="(list.current_page>=list.last_page&&list.data.length>0)&&location.lng"
				:loading="loading" style="background-color: #f7f5f5;">
			</load-more>

      <view class="service-assurance flex-center" style="background-color: #f7f5f5;">
        <img src="../static/img/serviceImg/serviceAssurance.png" alt="">
      </view>

			<block
				v-if="(!loading&&list.data.length<=0&&list.current_page==1) || (!loading&&list.data.length<=0&&list.current_page==1&&(!city_info || (city_info&&!city_info.id&&!city_info.title))&&cityList.length>0&&location.lat&&location.lng)">
				<abnor v-if="location.lat&&location.lng && !isCoachList">
				</abnor>
				<abnor v-if="location.lat&&location.lng&&isCoachList"
					:image="`https://api.huixuananmm.com/admin/public/no-user.png`" :tip="[{ text: '暂无人员数据', color: 0 }]">
				</abnor>
				<block v-if="!location.lat&&!location.lng">
					<!-- #ifdef H5 -->
					<abnor type="NOT_LOCATION" title="暂无数据"></abnor>
					<!-- #endif -->
					<!-- #ifndef H5 -->
					<abnor type="NOT_LOCATION" title="暂无数据" @confirm="toOpenLocation"
						:button="[{ text: '开启定位' , type: 'confirm' }]" btnSize=""></abnor>
					<!-- #endif -->
				</block>
			</block>

			<view class="pt-lg pl-lg pr-lg flex-center f-caption c-title"
				v-if="!loading && configInfo.wechat_copyright">
				{{configInfo.wechat_copyright}}
			</view>

<!--			<view class="space-lg"></view>-->

			<longbingbing-technician-list-popup ref="technician_list_popup"></longbingbing-technician-list-popup>

			<uni-popup ref="coupon_auto_item" type="center" :maskClick="false">
				<view class="coupon-popup-new rel">
					<view class="rel">
						<!-- #ifdef H5 -->
						<view class="h5-image bg-img"
							:style="{ backgroundImage : `url('https://api.huixuananmm.com/admin/anmo/coupon/coupon-bg.png')`}">
						</view>
						<!-- #endif -->
						<!-- #ifndef H5 -->
						<image mode="aspectFill" lazy-load class="bg-img"
							:src="`https://api.huixuananmm.com/admin/anmo/coupon/coupon-bg.png`">
						</image>
						<!-- #endif -->

						<image class="coupon-b abs" src="https://api.huixuananmm.com/admin/anmo/coupon/coupon-bottom.png"
							mode="aspectFill"></image>
					</view>
					<view class="coupon-number abs">{{coupon_num}}张</view>
					<view class="coupon-info abs">
						<view class="rel coupon-item flex-center" v-for="(item,index) in couponList" :key="index">
							<image class="coupon-img" src="https://api.huixuananmm.com/admin/anmo/coupon/coupon-item.png"
								mode="aspectFill"></image>
							<view class="abs coupon-cont flex-between pr-lg">
								<view class="font-num flex-y-baseline coupon-item-left c-warning flex-x-center">
									<text class="text-bold" style="font-size: 74rpx;">{{item.discount}}</text>
									<text class="text-bold">元</text>
								</view>
								<view class="flex-1 coupon-item-right">
									<view class="f-desc text-bold ellipsis-2">{{item.title}}</view>
									<view class="f-icontext pt-sm" style="color: #6C6A6B;">{{item.end_time}}过期</view>
								</view>
							</view>
						</view>
					</view>
					<view class="flex-center btns" @tap.stop="toCouponGetBtn">
						<view class="flex-center c-base abs">
							立即使用
						</view>
					</view>
					<view class="flex-center">
						<i @tap.stop="toCloseCoupon('coupon_auto_item')" class="iconfont icon-close c-base"></i>
					</view>
				</view>
			</uni-popup>

			<uni-popup ref="coupon_item" type="center" :maskClick="false">
				<view class="coupon-popup flex-center rel">
					<!-- #ifdef H5 -->
					<view class="h5-image bg-img"
						:style="{ backgroundImage : `url('https://api.huixuananmm.com/admin/anmo/coupon/bianzu3.png')`}">
					</view>
					<!-- #endif -->
					<!-- #ifndef H5 -->
					<image mode="aspectFill" lazy-load class="bg-img"
						:src="`https://api.huixuananmm.com/admin/anmo/coupon/bianzu3.png`">
					</image>
					<!-- #endif -->

					<i @tap.stop="toCloseCoupon('coupon_item')" class="iconfont icon-close c-base abs"></i>
					<view class="coupon-info flex-center flex-column">
						<view class="tops flex-center flex-column">
							<view class="">
								成功领取
							</view>
							<view class="">
								卡券将放入“我的-我的卡券”
							</view>
						</view>
						<view class="lists flex-center">
							<scroll-view scroll-y style="width: 420rpx;height:100%;">
								<view class="list flex-between" v-for="(item, index) in couponList" :key="index">
									<image :src="`https://api.huixuananmm.com/admin/anmo/coupon/coupon.png`"
										mode="aspectFill">
									</image>
									<view class="flex-between">
										<view class="flex-center flex-column">
											<view class="price">
												{{item.discount}}
											</view>
											<view class="price_text">
												{{item.full*1>0?`满${item.full}可用`:`立减`}}
											</view>
										</view>
										<view class="title flex-y-center">
											<view class="ellipsis-3">
												{{item.title}}
											</view>
										</view>
									</view>
								</view>
							</scroll-view>
						</view>
					</view>
					<view class="btns flex-center" @tap.stop="userGetCoupon">
						<view class="flex-center">
							领取到卡包
						</view>
					</view>
				</view>
			</uni-popup>


			<uni-popup ref="link_img_item" type="center" :maskClick="false">
				<!-- #ifndef H5 -->
				<view :style="{height:`${configInfo.navBarHeight}px`}"></view>
				<!-- #endif -->
				<view class="popup-link-img flex-center flex-column">
					<image mode="widthFix" class="link-img" :src="popupInfo.img"></image>
					<view @tap.stop="toChangePopImg" class="flex-y-center f-mini-title mb-lg" style="color:#F4F6F7"
						v-if="popupInfo.is_pop"><i class="iconfont mr-sm"
							:class="[{'iconweixuanzhong':is_pop_img},{'iconxuanzhong1':!is_pop_img}]"
							style="font-size: 46rpx;"></i>
						<view class="text-bold">我已添加/关注, 不再弹窗</view>
					</view>
					<i @tap.stop="$refs.link_img_item.close()" class="iconfont icon-guanbi-fill"></i>
				</view>
			</uni-popup>


			<view :style="{height: `${configInfo.tabbarHeight}px`}"></view>
			<longbingbing-tabbar :cur="1"></longbingbing-tabbar>

			<!-- #ifdef APP-PLUS -->
			<longbingbing-open-location-info ref="open_location_info"></longbingbing-open-location-info>
			<longbingbing-login-info></longbingbing-login-info>

			<longbingbing-app-check-auth :type="appType" ref="app_check_item"
				@confirm="toConfirmAppCheckAuth"></longbingbing-app-check-auth>

			<longbingbing-preview-image ref="preview_image_item"></longbingbing-preview-image>
			<!-- #endif -->

			<longbingbing-change-user-type></longbingbing-change-user-type>
			<longbingbing-customer-item></longbingbing-customer-item>

		</block>

		<!-- #ifdef MP-WEIXIN -->
		<user-privacy ref="user_privacy" :show="false"></user-privacy>
		<!-- #endif -->

		<!-- #ifdef H5 -->
		<open-mini-program ref="open_mini_program" :info="openMiniForm"></open-mini-program>
		<!-- #endif -->
	</view>
</template>

<script>
	import {
		mapState,
		mapActions,
		mapMutations
	} from "vuex"
	import siteInfo from '@/siteinfo.js';
	import longbingbingCoachRecommendItem from "@/components/longbingbing-coach-recommend-item.vue"
	import longbingbingServiceListItem from "@/components/longbingbing-service-list-item.vue"
	import longbingbingIndustryCoachItem from "@/components/longbingbing-industry-coach-item.vue"
	import openMiniProgram from "@/components/open-mini-program.vue"
	import imageWindow from '@/components/image-window/image-window.vue'
	import longbingbingTechnicianListItem from "@/components/longbingbing-technician-list-item.vue"
	import longbingbingTechnicianListPopup from "@/components/longbingbing-technician-list-popup.vue"
	export default {
		components: {
			longbingbingCoachRecommendItem,
			longbingbingServiceListItem,
			longbingbingIndustryCoachItem,
			openMiniProgram,
			imageWindow,
			longbingbingTechnicianListItem,
			longbingbingTechnicianListPopup
		},
		data() {
			return {
				isLoad: false,
				options: {},
				navTitle: '',
				is_network: true,
				appType: 'location',
				appMethod: '',
				call_phone: '',
				couponList: [], //优惠券 
				coupon_discount: 0, //优惠券 
				coupon_num: 0, // 优惠券数量
				loading: true,
				lockTap: false,
				openMiniForm: {},
				popupInfo: {},
				isCoachList: false
			}
		},
		computed: mapState({
			pageActive: state => state.service.pageActive,
			banner: state => state.service.banner,
			service_cate: state => state.service.service_cate,
			cate_list: state => state.service.cate_list,
			recommend_style: state => state.service.recommend_style,
			industry_cate_list: state => state.service.industry_cate_list,
			activeIndex: state => state.service.activeIndex,
			tabList: state => state.service.tabList,
			param: state => state.service.param,
			list: state => state.service.list,
			have_coupon: state => state.service.have_coupon,
			is_pop_img: state => state.service.is_pop_img,
			technicianParam: state => state.technician.param,
			technicianList: state => state.technician.list,
			configInfo: state => state.config.configInfo,
			isGzhLogin: state => state.user.isGzhLogin,
			haveShieldOper: state => state.user.haveShieldOper,
			careerList: state => state.technician.careerList,
			cityList: state => state.technician.cityList,
			careerIndex: state => state.technician.careerIndex,
		}),
		async onLoad(options) {
			let launch = 0
			// #ifdef MP-WEIXIN 
			let {
				scene
			} = await uni.getLaunchOptionsSync()
			launch = scene // 1154：朋友圈
			options.launch = launch
			// #endif
			options = await this.updateCommonOptions(options)
			let {
				pid = 0,
					channel_id = 0
			} = options
			options.pid = pid * 1
			options.channel_id = channel_id * 1
			this.options = options
			// #ifdef MP-WEIXIN
			uni.showShareMenu({
				menus: ['shareAppMessage', 'shareTimeline']
			})
			// #endif

			let {
				realtime_location = 0
			} = this.configInfo
			let {
				pageActive,
				changeAddr
			} = this
			await this.$util.toAsyAccLogin()
			if (pageActive && (!realtime_location && !changeAddr) && (!channel_id || !pid)) {
				this.isLoad = true
				this.loading = false
				this.$util.hideAll()
				this.initNavTitle()
				return
			}
			if (!pageActive || (pageActive && (realtime_location || changeAddr))) {
				// #ifdef APP-PLUS 
				let isIos = uni.getDeviceInfo().system.includes('iOS')
				if (isIos) {
					let nt = plus.networkinfo.getCurrentType()
					if ([0, 1].includes(nt)) {
						console.log("无网络")
						this.is_network = false
						this.isLoad = true
						this.loading = false
						this.$util.hideAll()
						this.initNavTitle()
					} else {
						console.log("有网络")
						this.initIndex()
						this.initNavTitle()
					}
				} else {
					this.initIndex()
					this.initNavTitle()
				}
				// #endif
				// #ifndef APP-PLUS
				this.initIndex()
				this.initNavTitle()
				// #endif
			}
		},
		async onShow() {
			this.initNavTitle(this.appShare ? 0 : 1)

			if (!this.location.lat && this.locaRefuse) {
				this.toResetUtilLoca()
			}

			let {
				status: coach_status = 0,
				coach_position = 0
			} = this.userCoachStatus
			let {
				realtime_location = 0
			} = this.configInfo

			if (this.haveShieldOper == 2) {
				this.initIndex()
				this.updateUserItem({
					key: 'haveShieldOper',
					val: 0
				})
			} else if (this.pageActive && !realtime_location && coach_position && coach_status == 2) {
				let {
					lat,
					lng,
					isIp = true
				} = await this.$util.getUtilLocation(false)
				this.$util.updateCoachAddr({
					isIp,
					lat,
					lng,
					address: ''
				})
			}
			if (this.pageActive && this.userInfo.id && this.configInfo.coupon_get_type == 0) {
				this.getCouponList()
			}
		},
		onPullDownRefresh() {
			// #ifndef APP-PLUS
			uni.showNavigationBarLoading()
			// #endif
			let {
				realtime_location = 0,
					plugAuth = {
						hotel: 0
					}
			} = this.configInfo
			if (realtime_location || plugAuth.hotel) {
				this.updateUserItem({
					key: 'changeAddr',
					val: false
				})
			}
			this.initRefresh()
			uni.stopPullDownRefresh()
		},
		onReachBottom() {
			if (this.list.current_page >= this.list.last_page || this.loading) return;
			this.loading = true;
			this.getList(this.param.page + 1);
		},
		onShareTimeline() {
			let {
				navTitle: title
			} = this
			let {
				app_logo
			} = this.configInfo
			let imageUrl = app_logo || ''
			let {
				id: pid = 0
			} = this.userInfo
			let query = `pid=${pid}`
			return {
				title,
				imageUrl,
				query
			}
		},
		onShareAppMessage(e) {
			let {
				navTitle: title
			} = this
			let {
				id: pid = 0
			} = this.userInfo
			let path = `/pages/service?pid=${pid}`
			this.$util.log(path)
			return {
				title,
				imageUrl: '',
				path,
			}
		},
		watch: {
			locaRefuse(newval, oldval) {
				if (!newval) {
					this.toResetUtilLoca()
				}
			}
			// #ifndef H5
			,
			changeOnAddr(newval, oldval) {
				let {
					noloca,
				} = this.noChangeLoca
				if (newval && noloca) {
					this.initUtilLocaData()
				}
			},
			noChangeLoca(newval, oldval) {
				setTimeout(() => {
					let {
						lat,
						lng,
						unix = 0
					} = this.changeOnAddr
					let {
						noloca
					} = this.noChangeLoca
					let cur_unix = this.$util.DateToUnix(this.$util.formatTime(new Date(), 'YY-M-D h:m:s'))
					if (noloca && ((!lat && !lng) || !unix || (unix && (cur_unix - unix >= 1)))) {
						this.getUtilLocation()
					}
				}, 800)
			}
			// #endif
		},
		methods: {
			...mapActions(['getConfigInfo', 'getUserInfo', 'addScanRecord', 'updateScanRecord', 'updateCommonOptions',
				'getServiceIndex', 'getRecommendList', 'getServiceList', 'getPrivacySetting', 'getCityList',
				'getServiceCoachList', 'getIndustryType'
			]),
			...mapMutations(['updateUserItem', 'updateServiceItem', 'updateTechnicianItem', 'updateMapItem',
				'updateDynamicItem', 'updateShopstoreItem'
			]),
			async initIndex(refresh = false) {
				if (!this.configInfo.id || refresh) {
					await this.getConfigInfo()
				}
				let {
					pid = 0,
						channel_id = 0,
						launch = 0
				} = this.options
				let code = this.scanRecordId
				// #ifdef H5
				code = this.$util.getQueryString('code')
				// #endif 
				if (pid && !code) {
					this.addScanRecord({
						type: 2,
						qr_id: pid,
						is_qr: 0
					})
				}
				if (channel_id && !code) {
					this.addScanRecord({
						type: 9,
						qr_id: channel_id
					})
				}

				let {
					id: uid = 0
				} = this.userInfo

				if (launch != 1154 && (pid || channel_id) && !code && !uid) {
					await this.getUserInfo()
				}
				// #ifdef APP-PLUS
				if (this.app_model_type == 1) {
					let {
						lat = 0,
							lng = 0
					} = this.location
					if (!lat && !lng) {
						let val = await this.$util.getAddressByIp()
						this.updateUserItem({
							key: 'location',
							val
						})
						if (!val.lat && !val.lng) {
							await this.getCityList({
								lat,
								lng,
								change: 1
							})
						}
					}
				}
				// #endif
				await this.getServiceIndex()
				this.is_network = true
				this.isLoad = true
				this.isNotLoca()
			},
			initRefresh() {
				this.initIndex(true)
			},
			async initNavTitle(isShow = 0) {
				// #ifdef H5
				let {
					app_text = ''
				} = this.configInfo
				let title = app_text || '首页'
				uni.setNavigationBarTitle({
					title
				})
				this.navTitle = title
				// #endif
				if (this.scanRecordId) {
					this.updateScanRecord()
				}
				if (!isShow) {
					// #ifdef H5
					this.$jweixin.initJssdk(() => {
						this.toAppShare()
					})
					this.updateUserItem({
						key: 'appShare',
						val: false
					})
					// #endif
				}
			},
			async isNotLoca() {
					let {
						location,
						locaRefuse,
						changeAddr
					} = this
					let {
						plugAuth = {},
							realtime_location = 0
					} = this.configInfo
					let {
						recommend = false,
							hotel = false,
					} = plugAuth


					let {
						status: coach_status = 0,
						coach_position = 0
					} = this.userCoachStatus


					// #ifdef H5
					if (coach_position && coach_status == 2 && (!realtime_location && !recommend)) {
						this.updateUserItem({
							key: 'isChangeCoachLoca',
							val: true
						})
					}
					// #endif

					// #ifdef APP-PLUS
					if (!locaRefuse && (((realtime_location || hotel) && !changeAddr) || (!realtime_location &&
							recommend && !location
							.lat))) {
						// #endif
						// #ifndef APP-PLUS
						if (((realtime_location || hotel) && !changeAddr) || (!realtime_location && recommend && !
								location
								.lat)) {
							// #endif

							// #ifdef MP-WEIXIN
							let privacyCheck = this.$refs.user_privacy.check()
							if (privacyCheck || typeof(privacyCheck) == 'string') {
								if (privacyCheck) {
									this.$refs.user_privacy.open()
								}
								this.loading = false
								this.$util.hideAll()
								return
							}
							// #endif

							// #ifndef H5
							if (coach_position && coach_status == 2) {
								let {
									lat: change_lat = 0,
									lng: change_lng = 0,
									unix = 0
								} = this.changeOnAddr
								let cur_unix = this.$util.DateToUnix(this.$util.formatTime(new Date(),
									'YY-M-D h:m:s'))
								let noloca = change_lat && change_lng && (unix && (cur_unix - unix < 3)) ?
									false :
									true
								if (!noloca) {
									let loca = Object.assign({}, this.location, {
										lat: change_lat,
										lng: change_lng,
										is_util_loca: 1
									})
									this.updateUserItem({
										key: 'location',
										val: loca
									})
								}
								this.updateUserItem({
									key: 'noChangeLoca',
									val: {
										noloca
									}
								})
								if (this.noChangeLoca.noloca) return
								this.initUtilLocaData()
							} else {
								this.getUtilLocation()
							}
							return
							// #endif

							// #ifdef H5
							await this.$util.getUtilLocation()
							// #endif
						}
						this.initUtilLocaData()
					},
					async getUtilLocation() {
							await this.$util.getUtilLocation()
							this.initUtilLocaData()
						},
						async initUtilLocaData() {
								// #ifndef H5
								this.updateUserItem({
									key: 'noChangeLoca',
									val: {
										noloca: false
									}
								})
								// #endif
								await this.getData()
							},
							async toResetUtilLoca() {
									// #ifdef APP-PLUS
									let {
										lat: locaLat = 0,
										isIp = true
									} = this.location
									let {
										appCheckLocaStatus = null
									} = this
									if (!locaLat && appCheckLocaStatus == 1 && this.pageActive) {
										let {
											lng = 0,
												lat = 0
										} = await this.$util.getUtilLocation()
										if (!lat && !lng) return
										this.$refs.open_location_info.pShow = false
										let {
											recommend
										} = this.configInfo.plugAuth
										if (recommend) {
											await Promise.all([this.getRecommendList({
												lat,
												lng
											}), this.getList(1)])
										} else {
											await this.getList(1)
										}
										// this.$util.getMapInfo(isIp)
										let updateArr = ['updateMapItem', 'updateTechnicianItem',
											'updateDynamicItem', 'updateShopstoreItem'
										]
										updateArr.map(item => {
											this[item]({
												key: 'pageActive',
												val: false
											})
										})
									}
									// #endif
								},
								toConfirmAppCheckAuth() {
									let {
										appMethod
									} = this
									this[appMethod]()
								},
								toConfirmTel() {
									let {
										call_phone: url
									} = this
									this.$util.goUrl({
										url,
										openType: 'call'
									})
								},
								async toOpenLocation() {
										// #ifdef APP-PLUS
										if (plus.os.name == 'Android' && plus.navigator.checkPermission(
												'android.permission.ACCESS_FINE_LOCATION') ===
											'undetermined') {
											this.appMethod = 'toConfirmOpenLoca'
											this.$refs.app_check_item.open()
										} else {
											this.toConfirmOpenLoca()
										}
										// #endif
										// #ifndef APP-PLUS
										this.toConfirmOpenLoca()
										// #endif
									},
									async toConfirmOpenLoca() {
											// #ifdef MP-WEIXIN 
											let privacyCheck = this.$refs.user_privacy.check()
											if (privacyCheck) {
												this.$refs.user_privacy.open()
												return
											}
											// #endif
											this.initIndex()
										},
										async getData() {
											let {
												lat = 0, lng = 0, is_util_loca = 0, isIp = true
											} = this.location

											this.updateServiceItem({
												key: 'pageActive',
												val: true
											})
											this.$util.hideAll()

											let {
												plugAuth = {},
													realtime_location = 0
											} = this.configInfo
											let {
												recommend = false,
													hotel = false,
											} = plugAuth

											let coachInd = this.configInfo.page[1].findIndex(item => {
												return item.type === 'coach-list'
											})
											this.isCoachList = coachInd != -1
											if ((hotel && !this.changeAddr) || coachInd !== -1) {
												await this.getCityList({
													lat,
													lng,
													change: 1
												})
											}

											let {
												channel_id = 0
											} = this.options

											// #ifndef H5
											// #ifdef APP-PLUS
											if (!lat && !lng) {
												// #endif 
												// #ifdef MP-WEIXIN
												if (!lat && !lng && (realtime_location || (!
														realtime_location &&
														recommend))) {
													// #endif

													if (this.userInfo.id && this.have_coupon) {
														this.getCouponList()
													}
													this.updateServiceItem({
														key: 'recommend_list',
														val: []
													})
													this.updateServiceItem({
														key: 'list',
														val: {
															data: [],
															last_page: 1,
															current_page: 1
														}
													})
													this.loading = false
													this.$util.hideAll()
													if (this.userInfo.id && channel_id) {
														this.$api.user.bindChannel({
															channel_id
														})
													}
													return
												}
												// #endif

												if (recommend) {
													await Promise.all([this.getRecommendList({
														lat,
														lng
													}), this.getList(1)])
												} else {
													await this.getList(1)
												}
												if (this.userInfo.id) {
													if (this.have_coupon) {
														this.getCouponList()
													} else {
														this.initPopupImg()
													}
													if (channel_id) {
														this.$api.user.bindChannel({
															channel_id
														})
													}
												}
											},
											async getList(page = 0) {
													let {
														realtime_location = 0
													} = this.configInfo
													if (page) {
														let {
															tabList,
															activeIndex
														} = this
														let {
															service_filter = true
														} = this.banner
														if (!service_filter) {
															activeIndex = 0
														}
														let {
															sort,
															sign
														} = tabList[activeIndex]

														if (realtime_location && activeIndex == 0) {
															sort = 'type desc'
														}
														let desc = activeIndex == 0 || sign == 1 ? '' :
															'desc'

														let param = this.$util.deepCopy(this.param)
														let serviceInd = this.configInfo.page[1].findIndex(item => {
															return item.type === 'service-list'
														})
														let cateInd = this.cate_list.findIndex(item => {
															return item.id == param.cate_id
														})
														if ((param.cate_id && serviceInd !== -1 && !this.configInfo
																.page[1][serviceInd].data.isShowCate) || cateInd == -
															1) {
															param.cate_id = 0
														}
														let industryInd = this.industry_cate_list.findIndex(item => {
															return item.id == param.industry_type
														})
														if (industryInd == -1) {
															param.industry_type = 0
														}
														this.updateServiceItem({
															key: 'param',
															val: Object.assign({}, param, {
																page,
																sort: `${sort} ${desc}`
															})
														})
													}

													this.loading = true

													let {
														list: oldList,
														location,
													} = this

													let {
														lng = 0,
															lat = 0
													} = location
													// #ifdef APP-PLUS
													if (!lat && !lng) {
														// #endif
														// #ifndef APP-PLUS
														if (!lat && !lng && realtime_location) {
															// #endif
															this.loading = false
															this.$util.hideAll()
															return
														}

														let param = Object.assign({}, this.param, {
															lat,
															lng
														})
														if (param.cate_id == 0) {
															delete param.cate_id
														}
														let coachInd = this.configInfo.page[1].findIndex(item => {
															return item.type === 'coach-list'
														})
														if (coachInd !== -1) {
															param = Object.assign({}, param, {
																city_id: this.technicianParam.city_id
															})
															let cityIndex = this.cityList.findIndex(item => {
																return item.id == param.city_id
															})
															console.log(cityIndex, "===cityIndex")
															console.log(param, this.technicianParam,
																'=========> param')
															if (cityIndex == -1) {
																this.loading = false
																this.$util.hideAll()
																this.updateServiceItem({
																	key: 'list',
																	val: {
																		data: [],
																		last_page: 1,
																		current_page: 1
																	}
																})
																return
															}
															await this.getIndustryType()
															await this.getServiceCoachList(param)
															this.updateServiceItem({
																key: 'list',
																val: this.technicianList
															})
														} else {
															await this.getServiceList(param)
														}
														this.loading = false
														this.$util.hideAll()
													},
													async handerCateChange(id, key) {
															let key1 = key === 'cate_id' ? 'industry_type' : 'cate_id'
															this.updateServiceItem({
																key: 'param',
																val: Object.assign({}, this.param, {
																	[key]: id,
																	[key1]: 0
																})
															})
															this.getList(1)
														},
														handerTabChange(index) {
															this.updateServiceItem({
																key: 'activeIndex',
																val: index
															})
															let tabList = this.$util.deepCopy(this
																.tabList)
															let {
																is_sign,
																sign,
															} = tabList[index];
															if (is_sign) {
																tabList[index].sign = sign == 0 ? 1 :
																	0;
															}
															this.updateServiceItem({
																key: 'tabList',
																val: tabList
															})
															uni.pageScrollTo({
																scrollTop: 0
															})
															this.getList(1)
														},
														async getCouponList() {
																let {
																	lat,
																	lng
																} = this.location
																let param = {
																	lat,
																	lng
																}
																let {
																	discount = 0,
																		coupon_num = 0,
																		list
																} = await this.$api.service.couponList(param)
																discount = discount * 1
																this.couponList = list
																this.coupon_num = coupon_num
																if (discount) {
																	this.coupon_discount = discount
																}
																this.loading = false
																this.$util.hideAll()
																if (this.isLoad) {
																	let getCoupon = 0
																	if (coupon_num == 0) {
																		setTimeout(() => {
																			this.$refs.coupon_auto_item.close()
																		}, 2000)
																	}
																	if (discount > 0 && coupon_num > 0) {
																		getCoupon++
																		this.$refs.coupon_auto_item
																			.open()
																		if (this.$refs.link_img_item) {
																			this.$refs.link_img_item
																				.close()
																		}
																		if (this.$refs.coupon_item) {
																			this.$refs.coupon_item
																				.close()
																		}
																	}

																	if (discount == 0 && list.length >
																		0) {
																		getCoupon++
																		this.$refs.coupon_item.open()
																		if (this.$refs.link_img_item) {
																			this.$refs.link_img_item
																				.close()
																		}
																		if (this.$refs
																			.coupon_auto_item) {
																			this.$refs.coupon_auto_item
																				.close()
																		}
																	}

																	if (!getCoupon) {
																		this.initPopupImg()
																	}
																}
															},
															toAppShare() {
																let {
																	id: pid = 0
																} = this.userInfo
																let {
																	navTitle: title
																} = this
																let {
																	siteroot
																} = siteInfo
																let url = siteroot.split('/index.php')[
																	0]
																let href =
																	`${url}/${this.portName}/#/pages/service?pid=${pid}`
																let {
																	app_logo
																} = this.configInfo
																let imageUrl = app_logo || ''
																this.$jweixin
																	.showOptionMenu()
																this.$jweixin
																	.shareAppMessage(
																		title, '',
																		href,
																		imageUrl)
																this.$jweixin
																	.shareTimelineMessage(
																		title,
																		href,
																		imageUrl)
															},
															// 轮播图
															goBanner(e) {
																// connect_type 1查看大图，2文章
																let {
																	connect_type,
																	type_id: id = 0,
																	img: current,
																	linkType = 0,
																	link = []
																} = e
																if (connect_type) {
																	switch (connect_type) {
																		case 1:
																			// #ifdef APP-PLUS 
																			if (plus.os.name == 'Android' && plus
																				.navigator.checkPermission(
																					'android.permission.WRITE_EXTERNAL_STORAGE'
																				) === 'undetermined') {
																				this.$refs.preview_image_item
																					.previewImage({
																						current,
																						urls: [current]
																					})
																			} else {
																				this.$util
																					.previewImage({
																						current,
																						urls: [
																							current
																						]
																					})
																			}
																			// #endif
																			// #ifndef APP-PLUS
																			this.$util.previewImage({
																				current,
																				urls: [current]
																			})
																			// #endif 
																			break;
																		case 2:
																			this.$util.goUrl({
																				url: `/user/pages/article?id=${id}`
																			})
																			break;
																	}
																	return
																}

																let {
																	url
																} = link[0]
																this.toConfirmGoUrl(url, linkType, current[0].url)
															},
															// 导航栏
															goCate(e) {
																let {
																	id,
																	title,
																	url = '',
																	linkType = 0,
																	link = [],
																	img = []
																} = e
																if (linkType) {
																	url = link[0].url
																}
																if (!url) { // 默认分类
																	url =
																		`/user/pages/service/list?id=${id}&title=${title}`
																}
																if (!linkType) {
																	let methodModel = url ==
																		'/technician/pages/apply?type=1' ?
																		'toCheckLogin' : 'goUrl'
																	this.$util[methodModel]({
																		url
																	})
																	return
																}
																this.toConfirmGoUrl(url, linkType, img[0].url, title)
															},
															async toConfirmGoUrl(url, linkType, current, title = '') {
																	if (['/technician/pages/apply?type=1',
																			'/agent/pages/apply',
																			'/user/pages/feedback/box'
																		].includes(url)) {
																		this.$util.toCheckLogin({
																			url
																		})
																		return
																	}
																	if (linkType == 5) {
																		// #ifdef APP-PLUS 
																		if (plus.os.name == 'Android' && plus.navigator
																			.checkPermission(
																				'android.permission.WRITE_EXTERNAL_STORAGE'
																			) === 'undetermined') {
																			this.$refs
																				.preview_image_item
																				.previewImage({
																					current,
																					urls: [current]
																				})
																		} else {
																			this.$util.previewImage({
																				current,
																				urls: [current]
																			})
																		}
																		// #endif
																		// #ifndef APP-PLUS
																		this.$util.previewImage({
																			current,
																			urls: [current]
																		})
																		// #endif 
																		return
																	}

																	if (linkType == 6) {
																		this.popupInfo = {
																			img: url
																		}
																		this.$refs.link_img_item.open()
																		return
																	}
																	let methodObj = {
																		1: 'call',
																		2: 'miniProgram',
																		3: 'web',
																		4: 'navigateTo'
																	}
																	let openType = methodObj[linkType]

																	if (openType == 'call') {
																		// #ifdef APP-PLUS
																		if (plus.os.name == 'Android' && plus.navigator
																			.checkPermission(
																				'android.permission.CALL_PHONE') ===
																			'undetermined') {
																			this.call_phone = url
																			this.appMethod = 'toConfirmTel'
																			this.$refs.app_check_item.open()
																		} else {
																			this.$util.goUrl({
																				url,
																				openType: 'call'
																			})
																		}
																		// #endif
																		// #ifndef APP-PLUS
																		this.$util.goUrl({
																			url,
																			openType: 'call'
																		})
																		// #endif
																		return
																	}

																	// #ifdef H5
																	if (openType == 'web') {
																		window.location.href = url
																		return
																	}
																	if (openType == 'miniProgram') {
																		let arr = url.split(";")
																		let appid = arr[0]
																		let path = arr.length > 1 ?
																			arr[1] : ''
																		this.openMiniForm = {
																			title,
																			appid,
																			path,
																			img: current
																		}
																		this.$refs.open_mini_program.open()
																		return
																	}
																	// #endif

																	this.$util.goUrl({
																		url,
																		openType
																	})
																},
																async userGetCoupon() {
																		let ids = []
																		this.couponList.forEach(v => {
																			ids.push(v.id)
																		})
																		await this.$api.service
																			.userGetCoupon({
																				coupon_id: ids
																			})
																		this.$util.showToast({
																			title: `领取成功`
																		})
																		setTimeout(() => {
																			this.$util.goUrl({
																				url: '/user/pages/coupon/list'
																			})
																		}, 1000)
																		this.$refs.coupon_item.close()
																		this.loading = false
																		this.$util.hideAll()
																	},
																	async toCouponGetBtn() {
																			this.$refs.coupon_auto_item
																				.close()
																			this.$util.goUrl({
																				url: '/user/pages/coupon/list'
																			})
																		},
																		toCloseCoupon(key) {
																			this.$refs[key].close()
																			this.initPopupImg()
																		},
																		initPopupImg() {
																			if (this.is_pop_img) {
																				this.popupInfo = {
																					img: this.configInfo.popup_img,
																					is_pop: 1
																				}
																				this.$refs.link_img_item.open()
																			}
																		},
																		async toChangePopImg() {
																				let {
																					is_pop_img
																				} = this
																				is_pop_img =
																					is_pop_img === 1 ?
																					0 :
																					1
																				await this.$api.mine
																					.updateUserPopImg({
																						is_pop_img
																					})
																				this.updateServiceItem({
																					key: 'is_pop_img',
																					val: is_pop_img
																				})
																			},
																			async toShowPopup(index, key) {
																					this.$refs.technician_list_popup
																						.toShowPopup(
																							this.list.data[index], key)
																				},
																				async toCollect(index) {
																					let {
																						id,
																						is_collect,
																						collect_num
																					} = this.list.data[index]
																					let methodModel = is_collect ?
																						'delCollect' : 'addCollect'
																					await this.$api.mine[
																						methodModel]({
																						coach_id: id
																					})
																					this.$util.showToast({
																						title: is_collect ?
																							'取消成功' : '收藏成功'
																					})
																					this.list.data[index]
																						.is_collect =
																						is_collect == 1 ? 0 : 1
																					this.list.data[index]
																						.collect_num =
																						is_collect == 1 ?
																						collect_num - 1 :
																						collect_num + 1
																				}
												},
												filters: {
													handleCityText(val) {
														let text = `未知城市`
														if (val && val.title) {
															text = val.title
														}
														return text
													}
												}
										}
</script>

<style lang="scss">
	.pages-home {
    background: #fff !important;
    position: relative;
    .bg-top-color {
      position: absolute;
      top: 0;
      width: 100vw;
      height:320rpx;
      background: linear-gradient( 180deg, #58C06E 0%, #FAF9F9 100%);
    }
    //padding-top: 20rpx;
		.banner-filter {
			width: 100%;
			height: 34rpx;
			border-radius: 32rpx 32rpx 0 0;
      background: #fff !important;
		}

		.banner-search-box {
			width: 710rpx;
			bottom: 0;
			z-index: 9;
			overflow: hidden;
		}

    .intro {
      font-size: 24rpx;
      display: flex;
      justify-content: space-around;
	    padding: 16rpx;
      color: #008aff;
      img {
        height: 28rpx;
        width: 28rpx;
      }
    }

    .menu-list {
      display: flex;
      justify-content: space-around;
      font-size: 32rpx;
      margin-top: 60rpx;
      font-weight: 500;
      color: #2c3e50;
      img {
        height: 100rpx;
        width: 100rpx;
        margin-bottom: 20rpx;
      }
    }

    .recommend-combo {
      font-weight: 500;
      color: #2c3e50;
      img {
        height: 38rpx;
        width: 38rpx;
      }
    }

    .service-assurance {
      width: 100%;
      //margin: 0 80rpx;
      img {
        height: 100%;
        width: 600rpx;
      }
    }

		.service-cate-list {
			white-space: nowrap;
			width: calc(100% - 20px);
			margin: 20rpx 20rpx 0 20rpx;

			.cate-item {
				display: inline-block;
				text-align: center;
				box-sizing: border-box;
				min-width: 120rpx;
				height: 64rpx;
				color: #4e5250;
				margin-left: 16rpx;

				.flex-center {
					height: 64rpx;
					padding: 0 20rpx;
				}

				.abs {
					width: 100%;
					height: 100%;
					opacity: 0.09;
				}
			}

			.cate-item:nth-child(1) {
				margin-left: 0;
			}
		}

		.industry-cate-list {
			.tab-list {
				width: 100%;

				.list-item {
					width: 25%;

					.item-desc {
						min-width: 110rpx;
						height: 40rpx;
						padding: 0 12rpx;
					}
				}
			}

			.industry-list {
				.list-item {
					width: 204rpx;
					margin-right: 20rpx;

					.cover {
						width: 204rpx;
						height: 180rpx;
						border-radius: 8rpx;
						object-fit: cover;
					}
				}

				.list-item:nth-child(3n) {
					margin-right: 0;
				}
			}
		}
	}

	.coupon-auto-popup {
		width: 600rpx;
		height: 737rpx;
		padding: 0 40rpx;

		.bg-img {
			top: 0;
			left: 40rpx;
			width: 520rpx;
			height: 607rpx;
		}

		.icon-guanbi-fill {
			font-size: 40rpx;
			top: 22rpx;
			right: 0;
			z-index: 999;
		}

		.content {
			top: 200rpx;
			left: 40rpx;
			width: 520rpx;
			height: 365rpx;
			padding: 0rpx 60rpx;

			.title {
				font-size: 52rpx;
				color: #F12E1A;
				margin-bottom: 16rpx;
			}

			.f-mini-title {
				color: #3A3A3A;
			}
		}

		.get-btn {
			top: 657rpx;
			left: 77rpx;
			width: 448rpx;
			height: 81rpx;
			z-index: 1;
		}

		.get-btn.flex-center {
			z-index: 2
		}
	}

	.coupon-popup {
		width: 658rpx;
		height: 865rpx;

		.bg-img {
			width: 100%;
			height: 100%;
		}

		.icon-close {
			font-size: 60rpx;
			top: 50rpx;
			right: 60rpx;
			z-index: 999;
		}

		.coupon-info {
			position: absolute;
			width: 100%;
			height: 100%;
			bottom: 0;
			left: 0;

			.tops {
				width: 480rpx;
				color: #FB4523;
				position: absolute;
				top: 260rpx;

				>view:nth-child(1) {
					font-weight: bold;
					font-size: 30rpx;
				}
			}

			.lists {
				width: 500rpx;
				height: 300rpx;
				padding: 10rpx;
				overflow-x: hidden;
				position: absolute;
				bottom: 222rpx;

				.list {
					width: 420rpx;
					height: 130rpx;
					margin-bottom: 10rpx;
					margin-top: 5rpx;
					position: relative;

					>image {
						width: 100%;
						height: 100%;
					}

					>view {
						position: absolute;
						width: 100%;
						height: 100%;
						top: 0;
						left: 8rpx;

						>view:nth-child(1) {
							width: 38%;
						}

						>view:nth-child(2) {
							display: flex;
							justify-content: center;
							flex: 1;
							padding: 0 15rpx;
							box-sizing: border-box;
						}

						.price {
							font-size: 30rpx;
							color: #FB4523;
						}

						.title {
							font-size: 30rpx;
							line-height: 36rpx;
							font-weight: bold;
						}

						.price_text {
							color: #ccc;
						}
					}
				}
			}
		}

		view.btns {
			width: 100%;
			position: absolute;
			height: 82rpx;
			bottom: 0rpx;
			left: 0;

			>view {
				width: 422rpx;
				height: 82rpx;

				border-radius: 40rpx;
				font-size: 34rpx;
				color: #FFFFFF;
			}
		}
	}

	.coupon-popup-new {
		.bg-img {
			width: 634rpx;
			height: 905rpx;
		}

		.coupon-b {
			height: 152rpx;
			width: 618rpx;
			bottom: 8rpx;
			left: 8rpx;
			z-index: 9;
		}

		.coupon-info {
			top: 548rpx;
			height: 322rpx;
			overflow-y: scroll;
			width: 100%;
			padding-bottom: 100rpx;

			.coupon-item {
				margin: 0 auto;
				margin-bottom: 14rpx;
			}

			.coupon-cont {
				height: 322rpx;
				width: 550rpx;
				z-index: 1;
			}

			.coupon-img {
				width: 550rpx;
				height: 154rpx;
			}

			.coupon-item-left {
				width: 207rpx;
			}

			.coupon-item-right {
				padding-left: 42rpx;
			}
		}

		.coupon-number {
			top: 310rpx;
			font-size: 90rpx;
			color: #FF6D2A;
			text-shadow: 0px 7px 13px rgba(169, 85, 6, 0.35);
			right: 386rpx;
			word-break: keep-all;
		}

		view.btns {
			margin-top: -45rpx;
			height: 90rpx;

			>view {
				width: 262rpx;
				height: 90rpx;
				background: linear-gradient(90deg, #FFBB51 0%, #FF6E2A 52%, #FF6D2A 100%);
				border-radius: 90rpx;
				font-size: 47rpx;
				z-index: 10;
			}
		}

		.icon-close {
			font-size: 60rpx;
			margin-top: 36rpx;
		}
	}

	.popup-link-img {
		width: 588rpx;
		/* #ifdef H5 */
		margin: 25rpx 0;
		/* #endif */

		.link-img {
			width: 588rpx;
			max-height: 861rpx;
			margin-bottom: 19rpx;
		}

		.icon-guanbi-fill {
			font-size: 68rpx;
			color: #fff;
		}
	}

  .card-box-shadow {
    box-shadow: 0 4rpx 44rpx #eee
  }

  .service-banner {
    ::v-deep .swiper-ad__img {
      width: 95% !important;
      border-radius: 16rpx !important;
    }
  }

  .service-imageWindow {
	// padding: 16rpx;
	background-color: #F7F5F5;
    ::v-deep .img {
      height: 168rpx !important;
    }
    ::v-deep .img-item {
    //   margin: 0 12rpx !important;
    }
  }
  .service-banner-info {
	width: 100%;
	height: 226rpx;
    padding: 16rpx;
  }
.service-banner-info-img {
	width: 100%;
	height: 100%;
}
  .bg-white {
    background-color: #fff;
  }
  .radius-10 {
    border-radius: 10rpx;
  }
  .huiyuan{
	color: #2D2D31 !important;
  }
  .huiyuanjiage{
	font-weight: bold;
  }
  .service-imageWindow-img{
	width: 100%;
	height: 100%;
  }
</style>